# To change this template, choose Tools | Templates
# and open the template in the editor.

__author__="byronhulcher"
__date__ ="$Mar 9, 2011 5:32:57 PM$"

import socket
from socket import *

class Client:
    def __init__(self):
        self.myipstring = gethostbyname(gethostname())
        self.serveripstring = '192.168.1.107'
        self.serverport = 50000
        size = 1024
        self.socket = socket(AF_INET, SOCK_STREAM)
        self.socket.connect((self.serveripstring,self.serverport))

        data = "hello I'm  your client %s" %self.myipstring
        self.socket.send(data)
        data = self.socket.recv(size)
        self.socket.close()
        print 'Received:', data, "from", self.serveripstring

    


if __name__ == "__main__":
    myclient = Client()